<%@ page import="com.model.Project" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: chaiyuan
  Date: 2017/5/8
  Time: 17:07
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<nav class="navbar navbar-default">
    <div class="container-fluid">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar bar1"></span>
                <span class="icon-bar bar2"></span>
                <span class="icon-bar bar3"></span>
            </button>
            <a class="navbar-brand" href="#">题目审核结果</a>
        </div>
        <div class="collapse navbar-collapse">

            <ul class="nav navbar-nav navbar-right">
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        <i class="ti-user"></i>

                        <p>您好！${sessionScope.user.name}</p>
                        <b class="caret"></b>
                    </a>
                    <ul class="dropdown-menu">
                        <li><a href="#">修改信息</a></li>
                        <li><a href="#">退出登录 </a></li>

                    </ul>
                </li>

            </ul>

        </div>
    </div>
</nav>
<div class="content">
    <div class="container-fluid">
        <div class="row">
            <div class="col-md-12">
                <div class="card">
                    <div class="header">
                        <h4 class="title">课题列表</h4>
                        <p class="category">再可选的课题前单选即可</p>
                    </div>
                    <div class="content table-responsive table-full-width">
                        <table class="table table-striped">
                            <thead>
                            <th>#</th>
                            <th>课题名称</th>
                            <th>课题简介</th>

                            <th>状态</th>
                            </thead>
                            <tbody>
                            <%

                                List<Project> project = (List) request.getAttribute("list");
                                for (int i = 0; i < project.size(); i++) {
                            %>
                            <tr>
                                <%--<td><input type="radio" name="selected" value=<%=project.get(i).getStudent().getStr("stu_id")%>></td>--%>
                                <td><%=i+1%>
                                </td>
                                <td><%=project.get(i).getStr("name")%>
                                </td>
                                <td><%=project.get(i).getStr("introduce")%>
                                </td>
                                <td><%int status = project.get(i).getInt("status");
                                    switch (status){
                                        case 0:
                                %>
                                    未审核
                                    <%break;
                                        case 1:%>
                                    已通过
                                    <%break;
                                        case 2:%>
                                    已拒绝

                                    <%   break;
                                        default:
                                            break;}
                                    %>
                                </td>


                            </tr>
                            <%}%>

                            </tbody>
                        </table>



                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>
